import 'package:flutter_bloc/flutter_bloc.dart';

abstract class BaseBloc<Event, State> extends Bloc<Event, State> {
  BaseBloc(super.initialState);

  Map<Key, Value> copyMap<Key, Value>(Map<Key, Value> map) {
    var result = <Key, Value>{};
    map.forEach((k, v)=>result[k] = v);
    return result;
  }

  List<T> copyList<T>(List<T> list) {
    var result = <T>[];
    list.forEach((d)=>result.add(d));
    return result;
  }
}